//数据源的api
import request from '@/utils/request'
// let baseURL='http://192.168.1.72:8082'
//新建数据源
export function add(data) {
  return request({
    url: '/dataSourceInfo/add',
    method: 'post',
    data: data
  })
}
//分页查询和模糊查询 对象
export function fuzzyQueryWithPageQuery(query) {
  return request({
    url: '/dataSourceInfo/fuzzyQueryWithPageQuery',
    method: 'post',
    data: query
  })
}
//修改数据源
export function edit(data) {
  return request({
    url: '/dataSourceInfo/edit',
    method: 'put',
    data: data
  })
}
//删除数据源
export function deleteData(data) {
  return request({
    url: '/dataSourceInfo/delete',
    method: 'delete',
    data: data
  })
}
//锁定 现在进行更改
export function isLock(query) {
  return request({
    url: "/dataSourceInfo/isLock",
    method: "get",
    params: query,
  });
}
//配置数据源
export function config(data) {
  return request({
    url: '/dataSourceInfo/config',
    method: 'put',
    data: data
  })
}
//获取数据源配置
export function getDataSourceConfigList(query) {
  return request({
    url: "/dataSourceInfo/getDataSourceConfigList",
    method: "get",
    params: query,
  });
}
//测试数据源连接
export function testConnection(query) {
  return request({
    url: "/dataSourceInfo/testConnection",
    method: "get",
    params: query,
  });
}
